package com.jiedeng.dao;

import com.jiedeng.model.Person;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author 覃远龙
 * @ClassName: IPersonRepository
 * @Description:
 * @date 2017/7/4 10:19
 */
public interface IPersonRepository extends JpaRepository<Person, Long> {

    List<Person> findByPostId(long postId);

    List<Person> findByCorpId(long corpId);


    List<Person> findByCorpIdAndIsLock(long corpId,boolean isLock);

    /**
     *
     * @param isLock
     * @return
     */
    List<Person> findByIsLock(boolean isLock);

    /**
     * 根据号码查询
     *
     * @param phone
     * @return
     */
    List<Person> findByPhone(String phone);
    List<Person> findByLoginid(String loginid);

    List<Person> findByLoginidAndPassword(String loginid, String password);

    List<Person> findByLeader(long leader);
}
